package com.zero2oneblog.controller;

import com.zero2oneblog.entity.User;
import com.zero2oneblog.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author liangjiu
 * @since 2024-01-09
 */
//@Controller
//@RequestMapping("/zero2oneblog/user")
@RestController
public class UserController {

    @Autowired
    private IUserService userService;

    @GetMapping("/public/getUser")
    public List<User> test(String id){
        return userService.getUser(id);
//        userService.getUserWithPostsAndComments(id);
    }

}
